Skip to content

[DX] Define list of allowed implicit commands on ConsoleApplication#7918

Merged
TomasVotruba merged 7 commits intomainfrom
dx-define-allowed-commands
Mar 1, 2026
Merged

[DX] Define list of allowed implicit commands on ConsoleApplication#7918
TomasVotruba merged 7 commits intomainfrom
dx-define-allowed-commands

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Feb 25, 2026

Fixes rectorphp/rector#9677

@MrYamous @TomasVotruba this should make more clear message that passed argument is an allowed implicit commands.

Before

Image

After

Image

@samsonasik samsonasik marked this pull request as draft February 25, 2026 14:31
@samsonasik samsonasik marked this pull request as ready for review February 25, 2026 14:47
@samsonasik
Copy link
Member Author

@TomasVotruba ready 👍

@samsonasik samsonasik force-pushed the dx-define-allowed-commands branch from 4f85941 to 62328c7 Compare March 1, 2026 14:42
@samsonasik
Copy link
Member Author

Rebased and refactored to early return on null on command name 👍

Ready to merge 👍

/**
* @var string[]
*/
private const array ALLOWED_COMMANDS = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be dynamic, so we don't have to maintain it. There is already list of commands available here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomasVotruba sure, updated to use $this->has() method call check 👍 21caaf8

should be dynamically ok now 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@samsonasik samsonasik requested a review from TomasVotruba March 1, 2026 14:52
@TomasVotruba
Copy link
Member

Thank you, looks good 👍

@TomasVotruba TomasVotruba merged commit a22afd1 into main Mar 1, 2026
59 checks passed
@TomasVotruba TomasVotruba deleted the dx-define-allowed-commands branch March 1, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command "src" not found

3 participants